Depending on how much you want to see in the city. 3 – 5 days are enough to see a significant number of sights in Manhattan.
If you want to explore the rest of the boroughs (Bronx, Brooklyn, Queens, Staten Island) you will need 7 – 10 days. To extend your experience to other nearby cities (Boston, Philadelphia, Washington, Niagara Falls), then you definitely want 15 days.
We stayed 11 nights and took a one-day train trip to Washington.